from django.shortcuts import render,redirect
from mes import models
from urllib import request
from django.shortcuts import render
#连接mysql的类
import pymysql
import pymssql
#引入项目的settings文件
from django.conf import settings

#把写好的txt复制到制定的打印服务器，复制过去后，删除本地的txt文件
def print(request):
    import os
    import shutil
    old_path = 'C:\\Users\\Administrator\\PycharmProjects\\changer_mes\\jd_barcode.txt'
    new_path = 'C:\\'
    shutil.copy(old_path,new_path)
    os.remove(old_path)
    return render(request,'JD_BarcodePrint1.html')